import SuperClass from "./SuperClass";
const {ccclass,property} = cc._decorator;

@ccclass
export default class CheckPointComponent extends cc.Component {
    @property({type:cc.Component,default:[]})
    views:cc.Component []= [];


    onLoad(){
        console.log("chind length",this.views.length)
        for(let i=0;i<this.views.length;i++){
            this.views[i].node.setPosition(0,0)
        }
        

    }

    showView(event,viewName){
        this.views.filter(item=>{console.log("name:",item.node.name,viewName);return item.node.name == viewName}).forEach(item=>{item.node.active = true})
        
       
    }
    userInfo(){
        let user = cc.find("Canvas/玩家信息")
        user.active = true
    }

    
    dialog(){
        let user = cc.find("Canvas/对话流程")
        user.active = true
    }

    shop(){
        let user = cc.find("Canvas/商城")
        user.active = true
    }

    scroll(){
        let user = cc.find("Canvas/模板滚动")
        user.active = true
    }

    s1(){
        let user = cc.find("Canvas/复杂滚动")
        user.active = true
    }


    pageAdv(){
        let user = cc.find("Canvas/分页加强")
        user.active = true
    }

    

}
